home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
s
/
initialcaps.pprx
< prev
next >
Wrap
Text File
|
1992-03-14
|
1KB
|
38 lines
/*
@BInitialCaps @P@ICopyright Gold Disk Inc., February, 1992.
This Genie will convert the first letter of each word in a block of text to capital letters. The remainder of the block of text will remain unchanged.
*/
if ~show(l, "gdarexxsupport.library") then
if ~addlib("gdarexxsupport.library", 0, -30) then
exit_msg("Please install the gdarexxsupport.library in your libs: directory before using this Genie.")
if word(ppm_GetState(), 1) ~= 3 then
exit_msg("You must be in edit mode to run this Genie")
text = ppm_GetBlockText(1)
if text = '' then exit_msg("No block selected")
call ppm_ShowStatus("Working..")
do wrd = 1 to words(text)
fcharpos = skipcodes(text, wordindex(text, wrd))
if fcharpos = 0 then exit
fchar = substr(text, fcharpos, 1)
text = overlay(upper(fchar), text, fcharpos, 1)
end
call ppm_InsertText(text)
call ppm_ClearStatus()
exit_msg()
exit_msg: procedure
do
parse arg message
if message ~= '' then call ppm_ShowStatus(message)
exit
end